package conson.tech.manage.app.service.impl;

import conson.tech.manage.app.entity.pojo.AppUserRelation;
import conson.tech.manage.app.mapper.AppUserRelationMapper;
import conson.tech.manage.app.service.AppUserRelationService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * ClassName: AppUserRelationServiceImpl
 * Description:
 * Author: HXL
 * Date: 2020/6/10 1:56 下午
 * Version: 1.0
 */
@Slf4j
@Service
public class AppUserRelationServiceImpl implements AppUserRelationService {
    @Autowired
    private AppUserRelationMapper appUserRelationMapper;

    @Override
    public int deleteByUserId(Long userId) {

        return appUserRelationMapper.deleteByUserId(userId);
    }

    @Override
    public int saveIndex(List<AppUserRelation> list) {
        return appUserRelationMapper.batchInsertAppUserRelation(list);
    }

}
